package com.daiqile.myinterest.activity;

import android.support.v7.widget.Toolbar;
import android.view.View;

import com.daiqile.myinterest.BaseActivity;
import com.daiqile.myinterest.R;
import com.vondear.rxtools.view.dialog.RxDialogScaleView;
import com.vondear.rxtools.view.dialog.RxDialogSureCancel;

import butterknife.BindView;
import butterknife.OnClick;

public class ShowActivity extends BaseActivity {


    @BindView(R.id.toolbar)
    Toolbar toolbar;

    @Override
    protected int getContentView() {
        return R.layout.activity_show;
    }

    @Override
    protected void initView() {
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }


    @OnClick({R.id.btn_s_one, R.id.btn_s_two})
    public void onViewClicked(View view)  {
        switch (view.getId()) {
            case R.id.btn_s_one:
                final RxDialogSureCancel rxDialogSureCancel = new RxDialogSureCancel(this);//提示弹窗
                rxDialogSureCancel.getTitleView().setBackgroundResource(R.mipmap.logo);
                rxDialogSureCancel.setContent("你是傻逼吗");
                rxDialogSureCancel.getSureView().setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        rxDialogSureCancel.cancel();
                    }
                });
                rxDialogSureCancel.getCancelView().setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        rxDialogSureCancel.cancel();
                    }
                });
                rxDialogSureCancel.show();
                break;
            case R.id.btn_s_two:
                RxDialogScaleView rxDialogScaleView = new RxDialogScaleView(this);
                rxDialogScaleView.setImageRes(R.drawable.timg7);
                rxDialogScaleView.show();
                break;
        }
    }
}
